package cn.kgc.jdbc.controller;

import cn.kgc.jdbc.service.UserService;

import java.util.Scanner;

/**
 * @author: mosin
 * @version: v1.0  2022/4/19
 * 用于接收前台传递的参数  数据的响应
 */
public class UserController {

    private UserService userService = new UserService();
    //登录请求
    public  boolean  login(String username,String passwd){
        //调用业务层 判定用户是否登录成功
        boolean login = userService.login(username, passwd);
        return  login;
    }

    //注册请求
    public String  register(String username,String passwd){
        //调用业务层 判定用户是否登录成功
        return  userService.register(username, passwd);
    }


}
